package com.example.gcjjhd.agriculture.entity;


import javax.persistence.*;
import lombok.Data;

import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.List;

@Data
@Entity
@Table(name = "devices")
public class Device {
    @Id
    private String id;

    private String name;
    private String type;
    private String area;
    private String status;

    @Column(name = "last_update")
    private LocalDateTime lastUpdate;

    @OneToMany(mappedBy = "device")
    private List<WeatherStationData> weatherData;
}